package com.itheima.d07_thread_synchronized_method;

/**
 * 取钱线程类
 */
public class DrawThread extends Thread{

    private Account account;//账户

    public DrawThread(String name, Account account) {
        super(name);
        this.account = account;
    }

    @Override
    public void run() {
        //线程要做的事情：取现
        System.out.println("测试");
        account.takeoutMoney(100000);
    }
}
